import Vue from 'vue'
import VueRouter from 'vue-router'
//引入findmusic，musiclist，mymusic三个组件
import findhead from '../components/findmusic/findhead/findhead.vue'
import findmusic from '../components/findmusic/findmusic.vue'
import musiclist from '../components/musiclist/musiclist.vue'
import mymusic from '../components/mymusic/mymusic.vue'
import recommend from '../components/findmusic/Recommend/Recommend.vue'
import Billboard from '../components/findmusic/Billboard/Billboard.vue'
import playMusic from '../components/utils/playMusic/playMusic'
Vue.use(VueRouter);

export default new VueRouter({
  routes: [
    {
      path: "/",
      redirect: '/findmusic/recommend'
    },
    {
      path: '/findmusic/recommend',
      components: {
        findhead: findhead,
        Recommend: recommend,
        Billboard: Billboard,
      }
    },
    {
      path: '/musiclist',
      component: musiclist
    },
    {
      path: '/mymusic',
      component: mymusic
    },
    {
      path: '/music',
      component: playMusic
    }
  ]
})
